<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%String contextRoot = request.getContextPath();%>
<f:loadBundle basename="properties.messages" var="msg" />
<f:view>
<!doctype html>
<head>
	<%@ include file="include/meta.jsp" %>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>SISDEP : Sistema de Informaci<h:outputText value="#{msg.tilde_o}" />n de Espacio P<h:outputText value="#{msg.tilde_u}" />blico</title>
	<meta name="description" content="">
	<meta name="author" content="">
	<link rel="stylesheet" href="<%= contextRoot %>/css/normalize.css">
	<link rel="stylesheet" href="<%= contextRoot %>/css/validationEngine.jquery.css"> <!-- Del validador de formularios -->
	<link rel="stylesheet" href="<%= contextRoot %>/css/jquery-ui-1.8.18.custom.css"> <!-- date-picker -->
	<link rel="stylesheet" href="<%= contextRoot %>/css/uniform.css"> <!-- estilos formularios -->
	<link rel="stylesheet" href="<%= contextRoot %>/css/tipsy.css">
	<link rel="stylesheet" href="<%= contextRoot %>/css/cuerpo.css">
	<link rel="stylesheet" href="<%= contextRoot %>/css/richCustom.css">
</head>
<body>
<div id="marco"> <!--inicio contenedor --> 
<div class="arriba-cuerpo"></div> <!-- Burrada pa ver borde redondo en IE -->
<div class="cuerpo">
<a href="<%=contextRoot%>/index.jsf"><img src="<%= contextRoot %>/images/logos.png" /></a>
<div class="clear"></div>
<!-- Menu y Usuario init() -->
	<%@ include file="include/menuUsuario.jsp" %>
<!-- Menu y Usuario end() -->
<div class="clear"></div>
<!-- Formulario --> 
<div id="buscador">
<h2>Bandeja de entrada, Solicitudes SDEP: EDICION</h2>
<h:form id="updateSolicitudForm">
	<h:inputHidden id="idPersona" value="#{solicitudController.solicitud.idPersona}" />
	
						<span class="left" style="margin-left:5px;">
						<label>Radicado <span class="asterisco">*</span></label>
							<h:inputText id="radicado" size="15" maxlength="15" styleClass="validate[required,custom[integer],maxSize[15]]"
										value="#{solicitudController.solicitud.radicado}"/>
						</span>
						<span class="espacio-adicional left" style="margin-left: 40px;">
						<label>Fecha Radicado <span class="asterisco">*</span></label>
							<h:inputText id="fechaRadicado" styleClass="validate[required,custom[date]] fechaRadicado" size="10" maxlength="10"
									value="#{solicitudController.solicitud.fechaRadicado}">
								<f:convertDateTime pattern="dd/MM/yyyy"/>
							</h:inputText>
						</span>
						
						<div class="clear" style="margin-left: 400px;"></div>
						
						<span class="left" style="margin-left: 0px;">
						<label>Tipo Solicitud <span class="asterisco">*</span></label>
							<h:selectOneMenu id="idTipoSolicitud" styleClass="validate[required]" 
												value="#{solicitudController.solicitud.idTipoSolicitudStr}" readonly="true" disabled="true"> 
                                <f:selectItem itemLabel="Seleccione..." itemValue=""/>
								<f:selectItems value="#{masterListCache.newRequestTypeList}"/>
                            </h:selectOneMenu>
						</span>

						<div class="clear" style="margin-left: 400px;"></div>
						
						<span class="left" style="margin-left: 5px;">
						<label>Tipo Identificaci<h:outputText value="#{msg.tilde_o}" />n<span class="asterisco">*</span></label>
							
							<h:selectOneMenu id="idTipoIdentificacionStr" styleClass="validate[required]" value="#{solicitudController.solicitud.persona.idTipoIdentificacionStr}" readonly="true" disabled="true">
								<f:selectItem itemLabel="Seleccione..." itemValue=""/>
								<f:selectItems value="#{masterListCache.classIdentificationForFilingType}"/>
				            </h:selectOneMenu>
						</span>
			
						<span class="left" style="margin-left: 100px;">
						<label>Identificaci<h:outputText value="#{msg.tilde_o}" />n<span class="asterisco">*</span></label> 
							<h:inputText id="identificacion" size="20" maxlength="20"
							styleClass="validate[required]" value="#{solicitudController.solicitud.persona.identificacion}" readonly="true" disabled="true "/>
						</span>

						<div class="clear" style="margin-left: 400px;"></div>
						
						<span class="left" style="margin-left:5px;">
						<label>Descripci<h:outputText value="#{msg.tilde_o}" />n <span class="asterisco">*</span></label>
							<h:inputTextarea id="descripcion" value="#{solicitudController.solicitud.descripcion}" rows="6" cols="80" styleClass="validate[required,maxSize[255]]"  readonly="true" disabled="true"/>
						</span>
						
						<div class="clear" style="margin-left: 400px;"></div>

						<span class="left" style="margin-left:0px">
							<label>Direcci<h:outputText value="#{msg.tilde_o}" />n Venta <span class="asterisco">*</span></label>	
							<h:inputText id="direccionVenta" size="60" maxlength="60" styleClass="validate[required]"
										value="#{solicitudController.solicitud.direccionVenta}" readonly="true" disabled="true" />     
								
							<a4j:commandButton id="checkAddressButton"
											 styleClass="botonsmall"
							                 type="submit" 
							                 value="Verificar..." ajaxSingle="true" 
							                 ondblclick="return false;" reRender="checkAddressPanel"
					                         action="#{solicitudController.checkAddress}" disabled="true">
					                         
					                         <a4j:actionparam name="addressParam" value="document.getElementById('createSolicitudForm:direccionVenta').value" 
					                                          assignTo="#{solicitudController.solicitud.direccionVenta}" noEscape="true" />
							</a4j:commandButton>
						</span>

						<div class="clear" style="margin-left: 400px;"></div>

						<span class="left" style="margin-left:0px"><label>
						<a4j:outputPanel id="checkAddressPanel" layout="block" >
							<h:panelGrid columns="1" style="text-align: left;" styleClass="tablapaginacion" >
							<h:outputText value="Barrio: #{solicitudController.solicitud.codigoBarrio}-#{solicitudController.solicitud.barrio}" />
							<h:outputText value="Comuna: #{solicitudController.solicitud.codigoComuna}-#{solicitudController.solicitud.comuna}" />
	                        </h:panelGrid>
                        </a4j:outputPanel>
                        </label>
						</span>

						<div class="clear" style="margin-left: 400px;"></div>
												
						<span class="left" style="margin-left:5px;">
						<label>Prioridad <span class="asterisco">*</span></label>
							<h:selectOneMenu id="prioridad" styleClass="validate[required]"
												value="#{solicitudController.solicitud.prioridad}">
                                <f:selectItem itemLabel="Seleccione..." itemValue=""/>
                                <f:selectItem itemLabel="Alta" itemValue="A"/>
                                <f:selectItem itemLabel="Media" itemValue="M"/>
                                <f:selectItem itemLabel="Baja" itemValue="B"/>
                            </h:selectOneMenu>
						</span>
						<span class="left" style="margin-left:40px;">
						<label>Estado <span class="asterisco">*</span></label>
							<h:selectOneMenu id="estado" styleClass="validate[required]"
												value="#{solicitudController.solicitud.estado}">
                                <f:selectItem itemLabel="Seleccione..." itemValue=""/>
                                <f:selectItem itemLabel="Nuevo" itemValue="NUEVO"/>
                                <f:selectItem itemLabel="En Proceso" itemValue="EN_PROCESO"/>
                                <f:selectItem itemLabel="Pendiente Estudio Socioecon#{msg.tilde_o}mico" itemValue="PENDIENTE_ESTUDIO"/>
                                <f:selectItem itemLabel="Resuelto" itemValue="RESUELTO"/>
                            </h:selectOneMenu>
						</span>
						<h:inputHidden id="autorizacionWfWm" value="1" />
						<h:inputHidden id="idWfWm" value="1" />
		<br/>
		<br/>
		<br/>
		<div class="clear"></div>
		(<span class="asterisco"> * </span>) : Campo Obligatorio
		<div class="clear"></div>
		<span class="botones right">
		<h:commandButton id="updateSolicitudButton"
						 styleClass="botonsmall"
		                 type="submit" 
		                 value="Guardar" 
		                 ondblclick="return false;" 
		                 action="#{solicitudController.update}" >
		</h:commandButton>
		</span>
</h:form>
</div>
<!-- Fin formulario --> 
<div class="clear"></div>

	<!-- tabla --> 
	<div class="clear" style="width: 400px; margin-left: 0px;"></div>
	<br/>
	<span class="botones left" style="width: 223px; height: 20px; margin-left:5px; padding-top:5px; padding-bottom:5px; padding-left:20px; padding-right:20px; background-color: #006F73; color: white;">
	Informaci<h:outputText value="#{msg.tilde_o}" />n de Auditor<h:outputText value="#{msg.tilde_i}" />a
	</span>
	<div class="clear" style="margin-left: 400px;"></div>
	<div>
		<span class="left" >
		<span class="left" style="width: 110px; height: 20px; margin-left:5px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #EDEDED; border-top: 1px solid #999999; border-bottom: 1px solid #999999; border-left: 1px solid #999999; border-right: 1px solid #999999; color: #666666;">Usuario Creaci<h:outputText value="#{msg.tilde_o}" />n</span>
		<span class="left" style="width: 110px; height: 20px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #EDEDED; border-top: 1px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;">Fecha Creaci<h:outputText value="#{msg.tilde_o}" />n</span>
		<span class="left" style="width: 170px; height: 20px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #EDEDED; border-top: 1px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;">Usuario <h:outputText value="#{msg.tilde_u}" />ltima Modificaci<h:outputText value="#{msg.tilde_o}" />n</span>
		<span class="left" style="width: 170px; height: 20px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #EDEDED; border-top: 1px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;">Fecha <h:outputText value="#{msg.tilde_u}" />ltima Modificaci<h:outputText value="#{msg.tilde_o}" />n</span>
		</span>		
		<span class="left" >
		<span class="left" style="width: 110px; height: 20px; margin-left:5px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #ffffff; border-top: 0px solid #999999; border-bottom: 1px solid #999999; border-left: 1px solid #999999; border-right: 1px solid #999999; color: #666666;"><h:outputText value="#{solicitudController.solicitud.usuarioCrea}" /></span>
		<span class="left" style="width: 110px; height: 20px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #ffffff; border-top: 0px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;"><h:outputText value="#{solicitudController.solicitud.fechaCrea}" /></span>
		<span class="left" style="width: 170px; height: 20px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #ffffff; border-top: 0px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;"><h:outputText value="#{solicitudController.solicitud.usuarioModifica}" /></span>
		<span class="left" style="width: 170px; height: 20px; margin-left:0px; padding-top:5px; padding-bottom:5px; padding-left:10px; padding-right:10px; background-color: #ffffff; border-top: 0px solid #999999; border-bottom: 1px solid #999999; border-left: 0px solid #999999; border-right: 1px solid #999999; color: #666666;"><h:outputText value="#{solicitudController.solicitud.fechaModifica}" /></span>
		</span>
	</div>
	<div class="clear"><br/></div>
	<div>
		    <h:form id="cancelManageTypeForm">
			<h:commandButton id="cancelCreateSolicitudButton"
							 styleClass="botonsmall" 
                             type="submit" 
                             value="Cancelar" 
                             ondblclick="return false;" 
                             action="#{solicitudController.cancelSolicitud}" >
            </h:commandButton>
            </h:form>
	</div>
</div>
<div class="abajo-cuerpo"></div> <!-- Burrada pa ver borde redondo en IE -->
</div> <!-- Fin contenedor -->
<div class="footer"></div>
	<script src="<%=contextRoot%>/js/jquery/lib/jquery-1.7.2.min.js"></script><!-- De ser 1ro -->
	<script src="<%=contextRoot%>/js/script.js" type="text/javascript"></script><!-- De ser 2do -->
	<script src="<%=contextRoot%>/js/jquery/lib/jquery.uniform.min.js"></script> <!-- formularios -->
	<script src="<%=contextRoot%>/js/jquery/lib/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
	<script src="<%=contextRoot%>/js/jquery/lib/jquery.validationEngine-es.js" type="text/javascript" charset="utf-8"></script>	
    <script src="<%=contextRoot%>/js/jquery.maskedinput-1.3.js" type="text/javascript"></script>
    <script src="<%=contextRoot%>/js/jquery/lib/jquery.tipsy.js" type="text/javascript"></script> <!-- Tooltip -->
	<script type="text/javascript">
        jQ(document).ready(function() {
        	jQ("input, select, input:checkbox, input:radio, input:file").uniform();
        	jQ("#updateSolicitudForm").validationEngine('attach');
        	jQ("#updateSolicitudForm").bind("jqv.form.result", 
                	function(event, errorFound) {
        				if(!errorFound) 
            				displayLoadingImage();
        			});
        	jQ(".fechaRadicado").mask("99/99/9999");
        	jQ('#accesos li a').tipsy({gravity: 'n'});
        });    	
    </script>
	<%@ include file="include/validationStatus.jsp" %>
	<%@ include file="include/modalMessageWindow.jsp" %>
</body>
</html>
</f:view>

